﻿Imports Microsoft.Win32
Module OpenVPNCommon
    ' registry key locations
    Public Const Reg_NISTON_Root = "SOFTWARE\NISTON"
    Public Const Reg_Tunnels_Root As String = "SOFTWARE\NISTON\OpenVPNWinSvc\Tunnels"


    Public Function GetOVPNBinPath() As String
        Dim VPN_Bin_Path As String
        VPN_Bin_Path = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)
        If VPN_Bin_Path = "" Then VPN_Bin_Path = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)
        VPN_Bin_Path = VPN_Bin_Path & "\openvpn\bin\openvpn.exe"
        Return VPN_Bin_Path
    End Function


End Module
